This invention relates to communication between devices connected to a data communication system. More specifically, this invention relates to a transport interface that receives data packets from a high-speed serial bus and causes functions to be performed at nodes of the bus based on the contents of the data packets. The functions are performed by a set of tasks specifically chosen to implement a particular transport protocol. Each task within the set of tasks operates as a state machine according to a set of pre-ordained rules.
In general, there are two types of data buses: serial and parallel. A parallel bus is typically measured in capacity and speed. Parallel bus width capacity is measured in bytes and speed is usually measured in MHz or bytes/second. For example, the popular Peripheral Component Interconnect (PCI) bus is a parallel bus 32 bits wide and operating up to 33 MHz. At this frequency it can carry data at a rate of over 1 Gigabit per second (1 Gbps). A defining feature of a parallel bus is that all of the bits in its width are sent simultaneously, for instance, in the PCI bus, all 32 bits are sent at the same time during a cycle. This requires at least as many signal lines in the bus as its width, and additional lines for addressing, power, and other signals. The PCI bus has nearly 50 signal lines. Signal lines are usually embodied as traces on a printed circuit board or wires. The large number of signal lines in a parallel bus makes it expensive to implement. Additionally, the number of devices on a PCI bus is limited and each device requires a card and an open corresponding card slot to plug into the bus.
A serial bus, conversely, transfers data one bit at a time. Although this reduces the number of lines needed for the serial bus, it greatly extends the time needed to transmit data as compared to a parallel bus. For instance, if operating at the same frequency, a serial bus transmits only one bit of data in the same time a PCI bus transmits 32 bits. An example of a serial bus is the Universal Serial Bus (USB). This bus contains 4 wires, and has a maximum data rate of 12 Megabits per second (Mbps). The low number of wires makes a serial bus ideal for interconnecting devices via a cable, as the cable can be manufactured inexpensively. However, because data intensive applications require a high volume of data to be quickly moved, manufacturers have generally relied on parallel, rather than serial buses for interconnecting data-intensive devices. Applications using such data-intensive devices include video and audio reproduction, and high-speed storage mechanisms such as hard disk drives, among others.
Until now, designers of systems that move data over a bus had to choose between the fast and expensive parallel bus, or the slow and inexpensive serial bus.
Recently, specifications for a high-speed serial bus were adopted by the Institute of Electrical and Electronics Engineers. The specification, IEEE 1394-1995, is known as xe2x80x9cFireWirexe2x80x9d, or simply, 1394. The 1394 specification includes standards for data transfer rates of up to 400 Mbps using only 2 pairs of data wires and 1 pair of wires for power. This data rate is fast enough to accommodate the data intensive needs of video, audio and high speed storage. Future needs will be met by another proposed 1394 standard having a data rate over 1 Gbps. Therefore, by using a 1394 standard bus, data intensive tasks can be inexpensively implemented on a serial bus without the drawbacks of using a parallel bus.
The 1394 bus uses a peer-to-peer architecture. Physical and logical nodes attach to the 1394 bus by means of a six-conductor cable. Up to 63 nodes can be connected on each independent bus bridge, and 1,023 bridges are allowed in the system, for a total of over 65,000 devices on one 1394 system. It is likely that a 1394-to-PCI interface, possibly using the Open Host Controller Interface (OHCI) standard, will be used when using a 1394 bus in a computer. However, strictly speaking, the 1394 bus can operate independently from a computer by coupling related devices together via the connection cable. In addition to a cable specification, a backplane specification is provided for the 1394 bus. The backplane specification will most likely be used for a bus within a computer or some other wholly-contained system. The transport protocol interface described herein operates in either the cable or backplane environment.
The 1394 standard specifies three xe2x80x9clayers, xe2x80x9d physical, link, and transaction. The physical layer transmits electrical signals along the serial bus, arbitrates the bus by ensuring that only one node is sending data at a time, and translates electrical signals sensed from the bus into data signals for the link layer. The link layer assembles the data signals retrieved from the bus into data packets, and provides services such as addressing, data checking, and generating a xe2x80x9ccyclexe2x80x9d signal used for timing and synchronization. The transaction layer accepts the data packets from the link layer and includes bus transactions required to support a command and status register (CSR) architecture, including read, write, and lock. Several other buses use the CSR standard and specifying that 1394 must also conform to the CSR standard makes it easy to adapt or connect a 1394 bus to these other buses. Generally, the physical and link layers, as well as a limited number of transaction functions appear in hardware. The remainder of the transaction layer functions are performed in software.
To be useful, additional communication layers must communicate with and operate above the 1394 layers. For instance, directly above the transaction layer is a transport layer, using for example, Serial Bus Protocol-2 (SBP-2) or the standard IEC 61883 FCP/CMP, referred to as Functional Control Protocol (FCP). These standards define a protocol for the transport of commands and data over high performance serial buses. Additionally, above the transport layer is an application layer using such protocol standards as Reduced Block Commands (RBC), Printer Working Group (PWG), or Internet Protocol (IP). The interaction of these layers with each other and with the layers of the 1394 specification are further described herein.
It is thus desirable to have a transport protocol interface that performs all of the duties outlined in the 1394 specification in an expedient manner. It is also desirable for the transport protocol interface to be easily scaleable to include new services and tasks. It is also an advantage to develop a transport protocol interface architecture that can be easily modified for a variety of roles and functions.
In a data communication system, for instance a 1394 bus system, a transaction interface operates at a logical node on the bus. As packets are sent along the bus directed towards the specific node on which the transaction interface sits, the transaction interface decodes the packet contents into control blocks for further operation. The further operation can include execution by an application also operating at the local node. Additionally, the application may require data to be transmitted to another node on the bus. In this case, the application communicates with the transaction interface via message control blocks, which are then converted into data signals and placed on the bus to be received at the destination node.
In accordance with one aspect of the present invention, a transport protocol interface that is coupled to a serial bus is provided including a decoder coupled to the serial bus and structured to decode signals received from the serial bus into functions and data adhering to a transport protocol. The transport protocol interface also includes a plurality of tasks, each task structured to perform functions required by the transport protocol, and each task including at least one logic state and operating according to a predetermined state machine progression.
In other embodiments of the invention, a scheduler structured to start the tasks is part of the transport protocol interface. In still other embodiments of the invention, each task is structured to change states when it schedules another task or when it calls a service. At least one of the states in one of the plurality of tasks is structured to be in a suspended state pending notification by the scheduler that it can leave the suspended state and, in those embodiments including a scheduler, the scheduler is structured to enable the task in the suspended state to change states following notification to the task.
In another aspect of the present invention, a method to implement a function in a transport protocol is provided. The method includes steps of receiving the function of the transport protocol and passing to a task the necessary data to operate on the function. The task is in an initial state when the data is passed to it and the task has one or more states. The task then operates on the task and returns notification that the function has been completed.
In more embodiments of the invention, the task comprises more than one state and operating on the data includes changing states within the task.